package cn.iocoder.yudao.module.member.agency.job;

import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
import cn.iocoder.yudao.module.member.agency.service.AppAgencyUserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

/**
 * 招商人员过期 Job
 *
 * @author 山野羡民
 */
@Component
public class AgencyUserExpireJob implements JobHandler {

    @Resource
    private AppAgencyUserService appAgencyUserService;

    @Override
    @TenantJob
    public String execute(String param) {
        int count = appAgencyUserService.agencyExpireBySystem();
        return String.format("招商人员过期 %s 个", count);
    }

}
